import * as axios from "axios";
import {__API__} from "../constants";

export function put_positio_user({
                                     id,
                                     latitude,
                                     longitude,
                                     city,
                                     district,
                                     province,
                                     street,
                                 }) {
    return axios.put(`${__API__}/users/set-user-position/${id}`, {
        latitude,
        longitude,
        city,
        district,
        province,
        street,
    })
}

export function post_user_login({
                                    name, password
                                }) {
    return axios.post(`${__API__}/users/login`, {
        "user": {
            name, password
        }
    })
}


export function GET_STRAGERS({
                                 authorization,
                                 latitude,
                                 longitude,
                                 gender,
                                 distance,
                                 offset,
                                 limit,
                             }) {
    return axios.get(`${__API__}/friend/get-close-stranger`, {
        params: {
            authorization,
            latitude,
            longitude,
            gender,
            distance,
            offset,
            limit,
        }
    })
}